﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VBACodeingTool
{
    public static class FromHelper
    {
        public static Popup CreatePopup()
        {
            ProgramInstanceManager.Popup.CloseWindow();
            Popup popup = new Popup();
            ProgramInstanceManager.Popup = popup;
            MouseHelper.GetCaretPosition(out int X, out int Y);
            popup.X = X;
            popup.Y = Y;
            User32.SetParent(popup.Handle, (IntPtr)ProgramInstanceManager.VBE.MainWindow.HWnd);
            return popup;
        }
    }
}
